﻿<%@ Page Title="Admin Rediger Kontaktperson" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="adminContactPersonEdit.aspx.cs" Inherits="UCNKompetenceBors.Admin.adminContactPersonEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script language="javascript">
        function Hide() {
            document.getElementById('<%=lblConfirmUpdatedContactPerson.ClientID %>').style.display = 'none';
            return false;
        }
    </script>

    <div id="adminWrapper" class="contentSmallWrapper floatLeft">
        <div id="adminSubMenuBox" class="submenuBox floatLeft">
            <div class="subMenuBoxContent">
                <ul>
                    <li>
                        <asp:HyperLink ID="hyLinkAdminDashboard" runat="server" Text="Admin Dashboard"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkUserHandling" runat="server" Text="Brugerhåndtering"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkAdminExchange" runat="server" Text="Køb og Salg"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkNewsHandling" runat="server" Text="Nyhedshåndtering"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkEditInformation" runat="server" Text="Ret Information"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkContactPerson" runat="server" Text="kontaktpersoner" ForeColor="#FF9933"></asp:HyperLink>
                        <ul>
                            <li>
                                <asp:HyperLink ID="hyLinkCreateContactPerson" runat="server" Text="Opret kontaktperson"></asp:HyperLink></li>
                        </ul>
                    </li>
                    <li><asp:HyperLink ID="hylinkDepartment" runat="server" Text="Afdelinger"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkResetUsers" runat="server" Text="Reset Brugere"></asp:HyperLink></li>
                </ul>
            </div>
        </div>

        <div id="adminContentBox" class="contentBoxSmall floatLeft">
            <div id="adminContentBoxContent" class="floatLeft">
                <div class="inputFormSmall">
                    <div class="inputFormSmallLeft floatLeft">
                        <div class="inputFormSmallRow floatLeft">
                            <asp:Label ID="lblAdminContentHeader" runat="server" Text="Rediger Kontaktperson" CssClass="contentTitle"></asp:Label>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditContactPersonFname" runat="server" Text="Fornavn:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:TextBox ID="txtEditContactPersonFname" runat="server" Width="300px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalFname" runat="server" ErrorMessage="First Name is required" ToolTip="First Name is required" Text="*" ControlToValidate="txtEditContactPersonFname" ValidationGroup="AdminEditContactPerson" ForeColor="Red"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditContactPersonLname" runat="server" Text="Efternavn:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:TextBox ID="txtEditContactPersonLname" runat="server" Width="300px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalLname" runat="server" ErrorMessage="Last Name is required" ToolTip="Last Name is required" Text="*" ControlToValidate="txtEditContactPersonLname" ValidationGroup="AdminEditContactPerson" ForeColor="Red"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditContactPersonPhone" runat="server" Text="Telefon:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:TextBox ID="txtEditContactPersonPhone" runat="server" Width="300px"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="regexvalPhone" runat="server" ErrorMessage="Det valgte telefonnummer er ugyldigt" ToolTip="Det valgte telefonnummer er ugyldigt" ValidationGroup="AdminEditContactPerson" ValidationExpression="^((\(?\+45\)?)?)(\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2})$" ControlToValidate="txtEditContactPersonPhone" Text="*" ForeColor="Red" Display="Dynamic"></asp:RegularExpressionValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditContactPersonEmail" runat="server" Text="E-mail:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:TextBox ID="txtEditContactPersonEmail" runat="server" Width="300px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalEditContactPersonEmail" runat="server" ErrorMessage="E-mail is required" ToolTip="E-mail is required" Text="*" ControlToValidate="txtEditContactPersonEmail" ValidationGroup="AdminEditContactPerson" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="regexvalEmail" runat="server" ErrorMessage="Den valgte E-mail er ugyldig" ValidationExpression="^.+@[^\.].*\.[a-z]{2,}$" ControlToValidate="txtEditContactPersonEmail" ValidationGroup="AdminEditContactPerson" ToolTip="Den valgte E-mail er ugyldig" Display="Dynamic" Text="*" ForeColor="Red"></asp:RegularExpressionValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditContactPersonTitle" runat="server" Text="Titel:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:TextBox ID="txtEditContactPersonTitle" runat="server" Width="300px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalEditContactPersonTitle" runat="server" ErrorMessage="Title is required" ToolTip="Title is required" Text="*" ControlToValidate="txtEditContactPersonTitle" ValidationGroup="AdminEditContactPerson" ForeColor="Red"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditContactPersonDepartment" runat="server" Text="E-mail:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:TextBox ID="txtEditContactPersonDepartment" runat="server" Width="300px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalEditContactPersonDepartment" runat="server" ErrorMessage="Department is required" ToolTip="Department is required" Text="*" ControlToValidate="txtEditContactPersonDepartment" ValidationGroup="AdminEditContactPerson" ForeColor="Red"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                                <asp:Image ID="imgEditContactPersonImage" runat="server" Width="100px" Height="100px" />
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditContactPersonImage" runat="server" Text="Billede:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:FileUpload ID="fuEditContactPersonImage" runat="server" />
                                <br />
                                <asp:RegularExpressionValidator ID="regexvalEditContactPersonImage" runat="server" ForeColor="Red" ControlToValidate="fuEditContactPersonImage" ValidationGroup="AdminEditContactPerson" ErrorMessage="Filen du prøver at uploade er ikke tilladt" ValidationExpression=".*(\.[Jj][Pp][Gg]|\.[Gg][Ii][Ff]|\.[Jj][Pp][Ee][Gg]|\.[Pp][Nn][Gg])"></asp:RegularExpressionValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="floatLeft">
                                <asp:Label ID="lblConfirmUpdatedContactPerson" runat="server"></asp:Label>
                            </div>
                            <div class="floatRight">
                                <asp:Button ID="btnCancelEditContactPerson" runat="server" Text="Fortryd" CssClass="button" OnClick="btnCancelEditContactPerson_Click" />
                                <asp:Button ID="btnAdminEditContactPerson" runat="server" Text="Rediger KontaktPerson" ValidationGroup="AdminEditContactPerson" CssClass="button" OnClientClick="Hide()" OnClick="btnAdminEditContactPerson_Click" />
                            </div>
                        </div>
                    </div>
                    <div class="inputFormSmallRight floatRight">
                        <asp:ValidationSummary ID="valSumAdminEditContactPerson" ValidationGroup="AdminEditContactPerson" runat="server" HeaderText="Følgende fejl blev fundet:" ForeColor="Red" />
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
